<?php

/**
 * 带索引检查计算数组的差集
 */

$array1 = array ("a" => "green", "b" => "brown", "c" => "blue", "red", 'd' => 0);
$array2 = array ("b" => "green", "yellow", "red", 'd' => '0');
var_dump($array1);
echo '<br/>';
var_dump($array2);
echo '<br/>';
print_r(array_diff_assoc($array1, $array2));